﻿@namespace SwashbucklerDiary.Rcl.Components
@inherits MediaResourceListComponentBase

<div>
    <div class="adaptive-card-container">
        @foreach (var item in LoadedItems)
        {
            <AudioCard Value="item"></AudioCard>
        }
    </div>

    <MInfiniteScroll @ref="mInfiniteScroll"
                     Class="@($"{(HasMore?"":"py-0")}")"
                     OnLoad="@OnLoad"
                     Parent="@($"#{ScrollElementId}")"
                     EmptyText="@(string.Empty)"
                     LoadingText="@(string.Empty)">
        <LoadMoreContent Context="load">
            <MButton Icon="true"
                     OnClick="@load">
                <MIcon>mdi-reload</MIcon>
            </MButton>
        </LoadMoreContent>
    </MInfiniteScroll>
</div>

<EmptyResult Show="Value.Count == 0"
             Text="@(I18n.T("FileBrowse.Audio.NoAudio"))">
</EmptyResult>
